﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Master/Admin.Master" AutoEventWireup="true"
    CodeBehind="HotelsSet.aspx.cs" Inherits="Besture.UI.HotelsSet" %>

<%@ Import Namespace="Besture.Common" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Content" runat="server">
    <div class="editPage">
        <div class="tab-wrap">
            <ul class="tab">
                <li class="on" onclick="setTab(this,0)"><a href="javascript:void(0)" title="基本信息">基本信息</a></li>
                <li onclick="setTab(this,1)"><a href="javascript:void(0)" title="交通信息">交通信息</a></li>
                <li onclick="setTab(this,2)"><a href="javascript:void(0)" title="酒店信息">酒店信息</a></li>
                <li onclick="setTab(this,3)"><a href="javascript:void(0)" title="SEO信息">SEO信息</a></li>
            </ul>
        </div>
        <div class="tab-ct-wrap">
            <div class="tab1">
                <table cellspacing="0" cellpadding="0" class="table-module01">
                    <tr>
                        <th>
                            酒店名称：
                        </th>
                        <td>
                            <cms:TextBox runat="server" ID="txtHotelsName" Required="True" MaxLength="200" WidthExt="Width_400"></cms:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <th>
                            酒店图片(列表页面展示图片)：
                        </th>
                        <td>
                            <cms:UploadSinglePhoto runat="server" ID="imgHotelsImage" Required="True" Tips="请上传图片" />
                        </td>
                    </tr>
                    <tr>
                        <th>
                            电话：
                        </th>
                        <td>
                            <cms:TextBox runat="server" ID="txtTel" Required="True" MaxLength="50" WidthExt="Width_100"
                                ValidateExt="tel"></cms:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <th>
                            地址：
                        </th>
                        <td>
                            <cms:TextBox runat="server" ID="txtAddress" Required="True" MaxLength="500" WidthExt="Width_400"></cms:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <th>
                            地区位置：
                        </th>
                        <td>
                            <img src='/Admin/Themes/Images/indispensable.gif' align='absMiddle' />
                            <asp:DropDownList runat="server" ID="ddlArea" class="required">
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <th>
                            酒店星级：
                        </th>
                        <td>
                            <img src='/Admin/Themes/Images/indispensable.gif' align='absMiddle' />
                            <asp:DropDownList runat="server" ID="ddlHotelsStars" class="required">
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <th>
                            酒店特色：
                        </th>
                        <td>
                            <img src='/Admin/Themes/Images/indispensable.gif' align='absMiddle' />
                            <asp:DropDownList runat="server" ID="ddlCharacteristicID" class="required">
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <th>
                            酒店品牌：
                        </th>
                        <td>
                            <cms:SelectBrand runat="server" ID="selectBrand" Required="True"></cms:SelectBrand>
                        </td>
                    </tr>
                    <tr>
                        <th>
                            酒店设施：
                        </th>
                        <td>
                            <img src="/admin/Themes/images/indispensable.gif" /><input runat="server" id="btnFacility"
                                type="button" class="button Facility" onclick="ShowFacilityTree(); return false;"
                                value="请选择设施" />
                            <asp:TextBox runat="server" Style="display: none;" ID="txtFacilityValues" ClientIDMode="Static"
                                class="input-text FacilityNameClass required"></asp:TextBox>
                        </td>
                    </tr>
                      <tr>
                        <th>
                            最早办理入住时间：
                        </th>
                        <td>
                            <img src="/admin/Themes/images/indispensable.gif">
                            <asp:DropDownList runat="server" ID="ddlFastTime" class=" required ">
                                <asp:ListItem Value="">--请选择--</asp:ListItem>
                                <asp:ListItem Value="00:00">0点</asp:ListItem>
                                <asp:ListItem Value="01:00">1点</asp:ListItem>
                                <asp:ListItem Value="02:00">2点</asp:ListItem>
                                <asp:ListItem Value="03:00">3点</asp:ListItem>
                                <asp:ListItem Value="04:00">4点</asp:ListItem>
                                <asp:ListItem Value="05:00">5点</asp:ListItem>
                                <asp:ListItem Value="06:00">6点</asp:ListItem>
                                <asp:ListItem Value="07:00">7点</asp:ListItem>
                                <asp:ListItem Value="08:00">8点</asp:ListItem>
                                <asp:ListItem Value="09:00">9点</asp:ListItem>
                                <asp:ListItem Value="10:00">10点</asp:ListItem>
                                <asp:ListItem Value="11:00">11点</asp:ListItem>
                                <asp:ListItem Value="12:00">12点</asp:ListItem>
                                <asp:ListItem Value="13:00">13点</asp:ListItem>
                                <asp:ListItem Value="14:00">14点</asp:ListItem>
                                <asp:ListItem Value="15:00">15点</asp:ListItem>
                                <asp:ListItem Value="16:00">16点</asp:ListItem>
                                <asp:ListItem Value="17:00">17点</asp:ListItem>
                                <asp:ListItem Value="18:00">18点</asp:ListItem>
                                <asp:ListItem Value="19:00">19点</asp:ListItem>
                                <asp:ListItem Value="20:00">20点</asp:ListItem>
                                <asp:ListItem Value="21:00">21点</asp:ListItem>
                                <asp:ListItem Value="22:00">22点</asp:ListItem>
                                <asp:ListItem Value="23:00">23点</asp:ListItem>
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <th>
                            酒店最晚抵店时间：
                        </th>
                        <td>
                            <img src="/admin/Themes/images/indispensable.gif">
                            <asp:DropDownList runat="server" ID="ddlDate" class=" required ">
                                <asp:ListItem Value="">--请选择--</asp:ListItem>
                                <asp:ListItem Value="00:00">0点</asp:ListItem>
                                <asp:ListItem Value="01:00">1点</asp:ListItem>
                                <asp:ListItem Value="02:00">2点</asp:ListItem>
                                <asp:ListItem Value="03:00">3点</asp:ListItem>
                                <asp:ListItem Value="04:00">4点</asp:ListItem>
                                <asp:ListItem Value="05:00">5点</asp:ListItem>
                                <asp:ListItem Value="06:00">6点</asp:ListItem>
                                <asp:ListItem Value="07:00">7点</asp:ListItem>
                                <asp:ListItem Value="08:00">8点</asp:ListItem>
                                <asp:ListItem Value="09:00">9点</asp:ListItem>
                                <asp:ListItem Value="10:00">10点</asp:ListItem>
                                <asp:ListItem Value="11:00">11点</asp:ListItem>
                                <asp:ListItem Value="12:00">12点</asp:ListItem>
                                <asp:ListItem Value="13:00">13点</asp:ListItem>
                                <asp:ListItem Value="14:00">14点</asp:ListItem>
                                <asp:ListItem Value="15:00">15点</asp:ListItem>
                                <asp:ListItem Value="16:00">16点</asp:ListItem>
                                <asp:ListItem Value="17:00">17点</asp:ListItem>
                                <asp:ListItem Value="18:00">18点</asp:ListItem>
                                <asp:ListItem Value="19:00">19点</asp:ListItem>
                                <asp:ListItem Value="20:00">20点</asp:ListItem>
                                <asp:ListItem Value="21:00">21点</asp:ListItem>
                                <asp:ListItem Value="22:00">22点</asp:ListItem>
                                <asp:ListItem Value="23:00">23点</asp:ListItem>
                            </asp:DropDownList>
                        </td>
                    </tr>

                    <tr>
                        <th>
                            酒店介绍(在首页显示)：
                        </th>
                        <td>
                            <cms:TextBox runat="server" ID="txtIntroduction" Tips="如果该酒店是推荐到首页的才需要填写" Required="False"
                                MaxLength="8" WidthExt="Width_400" TextMode="MultiLine" Height="100"></cms:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <th>
                            酒店图片(在首页显示的宽图片)：
                        </th>
                        <td>
                            <cms:UploadSinglePhoto runat="server" ID="imgHotelsImage1" Required="False" Tips="请上传图片" />
                        </td>
                    </tr>
                    <tr>
                        <th>
                            酒店详情图片：
                        </th>
                        <td>
                            <cms:UploadMultiPhoto runat="server" ID="UploadMultiPhoto" NeedThumbnail="True" ThumbnailFolderPath="/Upload/Image/Thumbnails/"
                                ThumbnailWidth="129" ThumbnailHeight="129" Required="True" Tips="※请上传图片" />
                        </td>
                    </tr> 
                    <tr>
                        <th>
                            属性：
                        </th>
                        <td>
                            <cms:ASPxCheckBox runat="server" ID="cbRecommendationList" Text="推荐到列表页面">
                            </cms:ASPxCheckBox>
                            <cms:ASPxCheckBox runat="server" ID="cbRecommendationPay" Text="推荐到会员支付页面">
                            </cms:ASPxCheckBox>
                            <cms:ASPxCheckBox runat="server" ID="cbRecommendationHome" Text="推荐到首页">
                            </cms:ASPxCheckBox>
                            <cms:ASPxCheckBox runat="server" ID="cbTopHotels" Text="首页热门酒店">
                            </cms:ASPxCheckBox>
                        </td>
                    </tr>
                    <cms:Sort runat="server" ID="txtSortID" Table="TBHotels" />
                </table>
            </div>
            <div class="tab1" style="display: none;">
                <div class="operateBar">
                    <ul>
                        <li><a href="javascript:grid.SelectRows();" class="operate-all"><s class="icon-gou-red">
                        </s>全选</a></li>
                        <li><a href="javascript:grid.UnselectRows();" class="operate-cancel"><s class="icon-cancel-yellow">
                        </s>取消</a></li>
                        <li>
                            <asp:LinkButton ID="lbAllDelete" runat="server" OnClientClick="return confirm('删除后无法恢复，确定删除选中项吗?');"
                                class="operate-delete" OnClick="BtnDelClick"><s class="icon-delete"></s>删除</asp:LinkButton>
                        </li>
                        <li><a class="operate-add" href="javascript:void(0);" onclick="ShowTrafficTree('');">
                            <s class="icon-add-green"></s>添加</a>
                            <%--<asp:LinkButton ID="lbAdd" runat="server" class="operate-add" OnClick="BtnAddClick"><s class="icon-add-green"></s>添加</asp:LinkButton>--%>
                        </li>
                    </ul>
                </div>
                <!--顶部操作按钮结束-->
                <cms:ASPxGridView ID="grid" ClientInstanceName="grid" runat="server" Width="99%"
                    AutoGenerateColumns="False" KeyFieldName="ID" OnCustomCallback="GridCustomCallback"
                    OnRowDeleting="GridRowDeleting">
                    <Columns>
                        <cms:GridViewCommandColumn ShowSelectCheckbox="true" VisibleIndex="0" Width="50px"
                            FixedStyle="Left">
                            <HeaderTemplate>
                                <input type="checkbox" onclick="grid.SelectAllRowsOnPage(this.checked);" title="全选/全不选"
                                    id="chkAll" runat="server" />
                            </HeaderTemplate>
                            <HeaderStyle HorizontalAlign="Center" />
                        </cms:GridViewCommandColumn>
                        <cms:GridViewDataTextColumn Caption="操作" VisibleIndex="2" Width="120px" HeaderStyle-HorizontalAlign="Center"
                            CellStyle-HorizontalAlign="Center" FixedStyle="Left">
                            <DataItemTemplate>
                                <div class="operateBox">
                                    <a class="btn-text-edit" href="javascript:void(0);" onclick="ShowTrafficTree(<%# Eval("ID") %>);" title="编辑"></a>
                                    &nbsp;&nbsp;<a class="btn-text-del" onclick="window.setTimeout(function(){aspxGVDeleteRow('ctl00_Content_grid',<%# Container.ItemIndex %>);},0)"
                                        title="删除"></a>
                                </div>
                            </DataItemTemplate>
                        </cms:GridViewDataTextColumn>
                        <cms:GridViewDataTextColumn Caption="地点信息" VisibleIndex="3" Width="" HeaderStyle-HorizontalAlign="Center"
                            CellStyle-HorizontalAlign="Center" FieldName="Location">
                            <Settings AutoFilterCondition="Contains"></Settings>
                        </cms:GridViewDataTextColumn>
                        <cms:GridViewDataTextColumn Caption="到达方式" VisibleIndex="4" Width="" HeaderStyle-HorizontalAlign="Center"
                            CellStyle-HorizontalAlign="Center" FieldName="GettingThere">
                            <Settings AutoFilterCondition="Contains"></Settings>
                        </cms:GridViewDataTextColumn>
                        <cms:GridViewDataTextColumn Caption="排序编号" VisibleIndex="5" Width="100" HeaderStyle-HorizontalAlign="Center"
                            CellStyle-HorizontalAlign="Center" FieldName="SortID">
                            <Settings AutoFilterCondition="Contains"></Settings>
                        </cms:GridViewDataTextColumn>
                        <cms:GridViewDataDateColumn Caption="创建时间" VisibleIndex="6" Width="180" HeaderStyle-HorizontalAlign="Center"
                            CellStyle-HorizontalAlign="Center" FieldName="CreateTime">
                            <PropertiesDateEdit DisplayFormatString="{0:yyyy-MM-dd HH:mm:ss}">
                            </PropertiesDateEdit>
                        </cms:GridViewDataDateColumn>
                    </Columns>
                </cms:ASPxGridView>
            </div> 
            <div class="tab1" style="display: none;">
                <table cellspacing="0" cellpadding="0" class="table-module01">
                    <tr>
                        <th>
                            酒店介绍：
                        </th>
                        <td>
                            <cms:RichText runat="server" ID="txtDetail" RichTextName="Detail"></cms:RichText>
                        </td>
                    </tr>
                    <tr>
                        <th>
                            网络设施：
                        </th>
                        <td>
                            <cms:RichText runat="server" ID="txtNetworkFacilities" RichTextName="NetworkFacilities">
                            </cms:RichText>
                        </td>
                    </tr>
                    <tr>
                        <th>
                            停车场：
                        </th>
                        <td>
                            <cms:RichText runat="server" ID="txtParkingLot" RichTextName="ParkingLot"></cms:RichText>
                        </td>
                    </tr>
                    <tr>
                        <th>
                            酒店设施：
                        </th>
                        <td>
                            <cms:RichText runat="server" ID="txtHotelFacilities" RichTextName="HotelFacilities">
                            </cms:RichText>
                        </td>
                    </tr>
                </table>
            </div>
            <div class="tab1" style="display: none;">
                <cms:Seo ID="ControlSeo" runat="server" />
            </div>
        </div>
        <div class="buttonDiv">
            <table width="98%" cellspacing="0" cellpadding="0" class="table-module01">
                <th width="130" align="right">
                    &nbsp;
                </th>
                <td>
                    <span class="btn-sure-wrap">
                        <asp:Button runat="server" ID="btnSubmit" CssClass="btn-sure btn-edit" Text="保存"
                            OnClick="BtnSubmitClick" /></span> <span class="btn-cancel-wrap">
                                                                   <asp:LinkButton runat="server" ID="btnCancel" CssClass="btn-cancel" Text="取消"
                            OnClick="BtnCancelClick" />
                            
                                <%--<input type="button" class="btn-cancel" value="取消" onclick="location.href='<%=ListUrl() %>'" />--%>
                                                               </span>
                </td>
            </table>
        </div>
    </div>
    <script type="text/javascript">
        //设施弹窗 
        var fDialog;
        function ShowFacilityTree() {
            var facilityValues = $("#txtFacilityValues").val();
            $.dialog({
                title: '选择设施',
                lock: true,
                content: 'url:/admin/Common/ChooseFacilityTree.aspx?facilityValues=' + facilityValues,
                max: false,
                min: false,
                resize: true,
                width: '400px',
                height: '400px'
            });
        }

        //交通信息弹窗
        var trafficDialog;
        function ShowTrafficTree(id) {
            trafficDialog = $.dialog({
                title: '交通信息',
                lock: true,
                content: 'url:/admin/Hotels/TrafficSet.aspx?id=' + id + '&hotelsId=<%=StringHelper.Query("id") %>',
                max: false,
                min: false,
                resize: true,
                width: '600px',
                height: '300px'
            });
        }

        //关闭弹窗并刷新Grid
        function closeTrafficTree() {
            trafficDialog.close();
            grid.PerformCallback("Refresh");
        }
    </script>
</asp:Content>
